package homework4.test;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import javax.annotation.Resource;
import java.lang.annotation.*;

/**
 * @author fengq
 */
public class MyAnnotation {
    public static void main(String[] args) throws ClassNotFoundException, NoSuchMethodException {
        Class<?> cl = Class.forName("homework4.test.MyAnnotation");
        Annotation[] getObjectInfos = cl.getMethod("getObjectInfo").getAnnotations();
        for (Annotation annotation:getObjectInfos){
            System.out.println(annotation);
        }
    }

    @After
    @Test
    @Resource
    @Before
    public void getObjectInfo(){
        System.out.println();
    }
}
